\(\int \frac {\sin ^3(x)}{i+\cot (x)} \, dx\) [2]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 37 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=\frac {4}{5} i \cos (x)-\frac {4}{15} i \cos ^3(x)+\frac {i \sin ^3(x)}{5 (i+\cot (x))} \]

[Out]

4/5*I*cos(x)-4/15*I*cos(x)^3+1/5*I*sin(x)^3/(I+cot(x))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3583, 2713} \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=-\frac {4}{15} i \cos ^3(x)+\frac {4}{5} i \cos (x)+\frac {i \sin ^3(x)}{5 (\cot (x)+i)} \]

[In]

Int[Sin[x]^3/(I + Cot[x]),x]

[Out]

((4*I)/5)*Cos[x] - ((4*I)/15)*Cos[x]^3 + ((I/5)*Sin[x]^3)/(I + Cot[x])

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3583

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(b*f*(m + 2*n))), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rubi steps \begin{align*} \text {integral}& = \frac {i \sin ^3(x)}{5 (i+\cot (x))}-\frac {4}{5} i \int \sin ^3(x) \, dx \\ & = \frac {i \sin ^3(x)}{5 (i+\cot (x))}+\frac {4}{5} i \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (x)\right ) \\ & = \frac {4}{5} i \cos (x)-\frac {4}{15} i \cos ^3(x)+\frac {i \sin ^3(x)}{5 (i+\cot (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.24 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=\frac {\csc (x) (45 i+20 i \cos (2 x)-i \cos (4 x)-40 \sin (2 x)+4 \sin (4 x))}{120 (i+\cot (x))} \]

[In]

Integrate[Sin[x]^3/(I + Cot[x]),x]

[Out]

(Csc[x]*(45*I + (20*I)*Cos[2*x] - I*Cos[4*x] - 40*Sin[2*x] + 4*Sin[4*x]))/(120*(I + Cot[x]))

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.86

method result size
risch \(\frac {i {\mathrm e}^{-5 i x}}{80}+\frac {5 i \cos \left (x \right )}{8}+\frac {\sin \left (x \right )}{8}-\frac {5 i \cos \left (3 x \right )}{48}-\frac {\sin \left (3 x \right )}{16}\) \(32\)
default \(-\frac {i}{4 \left (\tan \left (\frac {x}{2}\right )+i\right )^{2}}-\frac {1}{6 \left (\tan \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {x}{2}\right )+i\right )}-\frac {i}{\left (-i+\tan \left (\frac {x}{2}\right )\right )^{4}}-\frac {i}{2 \left (-i+\tan \left (\frac {x}{2}\right )\right )^{2}}+\frac {2}{5 \left (-i+\tan \left (\frac {x}{2}\right )\right )^{5}}-\frac {1}{3 \left (-i+\tan \left (\frac {x}{2}\right )\right )^{3}}+\frac {3}{8 \left (-i+\tan \left (\frac {x}{2}\right )\right )}\) \(93\)

[In]

int(sin(x)^3/(I+cot(x)),x,method=_RETURNVERBOSE)

[Out]

1/80*I*exp(-5*I*x)+5/8*I*cos(x)+1/8*sin(x)-5/48*I*cos(3*x)-1/16*sin(3*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.86 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=\frac {1}{240} \, {\left (-5 i \, e^{\left (8 i \, x\right )} + 60 i \, e^{\left (6 i \, x\right )} + 90 i \, e^{\left (4 i \, x\right )} - 20 i \, e^{\left (2 i \, x\right )} + 3 i\right )} e^{\left (-5 i \, x\right )} \]

[In]

integrate(sin(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

1/240*(-5*I*e^(8*I*x) + 60*I*e^(6*I*x) + 90*I*e^(4*I*x) - 20*I*e^(2*I*x) + 3*I)*e^(-5*I*x)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.30 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=- \frac {i e^{3 i x}}{48} + \frac {i e^{i x}}{4} + \frac {3 i e^{- i x}}{8} - \frac {i e^{- 3 i x}}{12} + \frac {i e^{- 5 i x}}{80} \]

[In]

integrate(sin(x)**3/(I+cot(x)),x)

[Out]

-I*exp(3*I*x)/48 + I*exp(I*x)/4 + 3*I*exp(-I*x)/8 - I*exp(-3*I*x)/12 + I*exp(-5*I*x)/80

Maxima [F(-2)]

Exception generated. \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(sin(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negative exponent.

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (23) = 46\).

Time = 0.25 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.86 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=-\frac {9 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 24 i \, \tan \left (\frac {1}{2} \, x\right ) - 11}{24 \, {\left (\tan \left (\frac {1}{2} \, x\right ) + i\right )}^{3}} + \frac {45 \, \tan \left (\frac {1}{2} \, x\right )^{4} - 240 i \, \tan \left (\frac {1}{2} \, x\right )^{3} - 490 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 320 i \, \tan \left (\frac {1}{2} \, x\right ) + 73}{120 \, {\left (\tan \left (\frac {1}{2} \, x\right ) - i\right )}^{5}} \]

[In]

integrate(sin(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-1/24*(9*tan(1/2*x)^2 + 24*I*tan(1/2*x) - 11)/(tan(1/2*x) + I)^3 + 1/120*(45*tan(1/2*x)^4 - 240*I*tan(1/2*x)^3
 - 490*tan(1/2*x)^2 + 320*I*tan(1/2*x) + 73)/(tan(1/2*x) - I)^5

Mupad [B] (verification not implemented)

Time = 12.91 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.32 \[ \int \frac {\sin ^3(x)}{i+\cot (x)} \, dx=\frac {\left (6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3-{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,2{}\mathrm {i}+2\,\mathrm {tan}\left (\frac {x}{2}\right )-\mathrm {i}\right )\,16{}\mathrm {i}}{15\,{\left (1+\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}\right )}^5\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}^3} \]

[In]

int(sin(x)^3/(cot(x) + 1i),x)

[Out]

((2*tan(x/2) - tan(x/2)^2*2i + 6*tan(x/2)^3 - 1i)*16i)/(15*(tan(x/2)*1i + 1)^5*(tan(x/2) + 1i)^3)